function(add_stack_object _INSTALL_HEADER_FILES)
	set(OBJECT_NAME stack)
	set(INSTALL_PATH include/stack)
	foreach (ARG IN LISTS ARGN)
		set(OBJECT_NAME ${OBJECT_NAME}__${ARG})
		set(INSTALL_PATH ${INSTALL_PATH}/${ARG})
	endforeach ()
	aux_source_directory(. ${OBJECT_NAME}_SOURCE)
	add_library(${OBJECT_NAME}_OBJECT OBJECT
			${${OBJECT_NAME}_SOURCE})
	if (_INSTALL_HEADER_FILES)
		file(GLOB HEADER_FILES *.h)
		install(FILES ${HEADER_FILES} DESTINATION ${INSTALL_PATH})
	endif ()
endfunction()

add_stack_object(FALSE)
